<template>
  <div>
    <p>学生姓名</p>
    <ul>
      <li v-for="(val, index) in arr" :key="index">
        {{ val }} --- {{ index }}
      </li>
    </ul>
    <hr />
    <ul>
      <li v-for="obj in stuArr" :key="obj.id">
        <span>{{ obj.id }}</span>
        <span>{{ obj.name }}</span>
        <span>{{ obj.sex }}</span>
        <span>{{ obj.hobby }}</span>
      </li>
    </ul>
    <div>
      <p v-for="(val, thekey) in tObj" :key="thekey">
        <span>{{ thekey }} -- {{ val }}</span>
      </p>
      <div v-for="n in 10" :key="n">{{ n }}</div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: ["小黑", "小马", "老陈", "老李"],
      stuArr: [
        {
          id: 1001,
          name: "孙悟空",
          sex: "男",
          hobby: "吃媳妇",
        },
        {
          id: 1002,
          name: "猪八戒",
          sex: "男",
          hobby: "背桃子",
        },
      ],
      tObj: {
        name: "小黑",
        age: 18,
        class: "1期",
      },
    };
  },
};
</script>

<style>
</style>